package com.port.eleport.model.biz;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import com.port.eleport.model.base.IdEntity;
import com.port.eleport.model.plat.TMerchant;

/**
 * 订单
 * @author jameschen
 *
 */
@Entity
@Table(name = "biz_order", schema = "")
@DynamicInsert(true)
@DynamicUpdate(true)
public class TOrder extends IdEntity {
	/**
	 * 购物网站代码
	 */
	@Column(name="order_from")
	private String orderFrom;
	/**
	 * 订单号
	 */
	@Column(name="order_no")
	private String orderNo;
	/**
	 * 订单总金额
	 */
	@Column(name="goods_amount")
	private BigDecimal goodsAmount;
	/**
	 * 运费
	 */
	@Column(name="post_fee")
	private BigDecimal postFee;
	/**
	 * 买家实付金额
	 */
	@Column(name="amount_")
	private BigDecimal amount;
	/**
	 * 买家账号
	 */
	@Column(name="buyer_account")
	private String buyerAccount;
	/**
	 * 税额
	 */
	@Column(name="tax_amount")
	private BigDecimal taxAmount;
	/**
	 * 优惠金额
	 */
	@Column(name="dis_amount")
	private BigDecimal disAmount;
	/**
	 * 订单创建时间
	 */
	@Column(name="create_time")
	private Date createTime;
	/**
	 * 商家
	 */
	@ManyToOne
	@JoinColumn(name = "merchant_id")
	private TMerchant merchant;
}
